﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
namespace HowItWentDown
{
    class Cloud : Obj
    {
        public Cloud(Game1 doc, float X, float Y, float Z)
            :base(doc,X,Y,Z,Global.LoadTexture("Cloud"),false)
        {
            velocity.X = MyMath.RandomRange(0.1f, 0.3f);
            clickable = false;
        }
        public override void Update()
        {
            if (x > 1600)
            {
                alpha -= 0.1f;
                if (alpha <= 0)
                    x = -100;
            }
            else if (alpha < 1)
            {
                alpha += 0.02f;
            }
            else alpha = 1;

            base.Update();
        }
    }
}
